package file_homework;

import java.io.File;

public class DeleteFileDir1 {
    public static void main(String[] args) {
        File file1 =new File("./src/test.txt");
//        File file2 = new File("./demo.txt");
//        File file3 =new File("./a/b/c");
        if (file1.exists()){
            file1.delete();
            System.out.println("已删除");
        }else {
            System.out.println("该文件不存在");
        }
    }
}
